<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      let obj = {
        name: '徐总',
        age: 19,

        one: {
          in: '窗前明月光',
          content: '疑是地上霜',
          text: '举头望明月',
          off: '低头思故乡',
        },
      }
      let num = {}
      function dome(obj, num) {
        for (let k in obj) {
          if (obj[k] instanceof Object) {
            num[k] = obj[k]
            dome(obj[k], num)
          }
        }
      }
      dome(obj, num)
      console.log(num)
      console.log(obj)
    </script>
  </body>
</html>
